import 'package:flutter/material.dart';

class UserNameView extends StatelessWidget {
  final String? name;
  final bool? isVip;
  final bool? isOfficial;
  final double fontSize;
  final FontWeight fontWeight;
  final Color? nameColor;

  const UserNameView({
    super.key,
    this.name,
    this.isVip,
    this.isOfficial,
    this.fontSize = 14,
    this.fontWeight = FontWeight.w500,
    this.nameColor,
  });

  @override
  Widget build(BuildContext context) {
    if (name?.isEmpty ?? true) return SizedBox.shrink();
    // if (isVip ?? false)
    //   return GradientText(
    //     name ?? '',
    //     colors: [Color(0xffFFE580), Color(0xffFACC15)],
    //     maxLines: 1,
    //     fontSize: fontSize,
    //     fontWeight: fontWeight,
    //   );
    return Text(
      name ?? '',
      maxLines: 1,
      overflow: TextOverflow.ellipsis,
      style: TextStyle(
        color: nameColor ?? Color(0xff9A9A9A),
        fontSize: fontSize,
        fontWeight: fontWeight,
      ),
    );
  }
}
